package io.buffered;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
public class Demo04BufferedWriter {
    public static void main(String[] args) throws Exception {
        File file = new File("F://Test//T1//e.txt");
        FileWriter fw = new FileWriter(file, true);
        BufferedWriter bw = new BufferedWriter(fw, 102400);

        String s = "靳海含";
        char[] chars = "我好开心呀".toCharArray();
        bw.write(s);
        bw.newLine();
        bw.write(s, 2, 1);
        bw.newLine();
        bw.write(chars);
        bw.newLine();
        bw.write(chars, 0, 1);

        bw.flush();
    }
}
